<template lang="pug">
.handdraw-icon.boxsi.hand(@click='showDrawer')
  i.el-icon-s-unfold

</template>

<script>
import { mapGetters } from 'vuex'

export default {
  computed: {
    ...mapGetters(['handdrawData']),
  },
  methods: {
    showDrawer() {
      if (!this.handdrawData) return
      let obj = {
        menus: this.handdrawData.overview_menu_items.menus,
        src: this.handdrawData.full_image_url,
        bgmusicName: this.handdrawData.bgmusic_name,
        bgmusicUrl: this.handdrawData.full_bgmusic_url,
        opentime: this.handdrawData.opentime,
        address: this.handdrawData.address,
        location_lng: this.handdrawData.location_lng,
        location_lat: this.handdrawData.location_lat,
        phone: this.handdrawData.telephone,
        intro: this.handdrawData.contents,
      }
      this.$vgo.emit('handdraw:info', {
        data: obj,
        biaoji: 1,
      })
    }
  }
}
</script>

<style lang="stylus" scoped>
.handdraw-icon
  width 32px
  height 32px
  text-align center
  padding 6px 0
  border-radius 50%
  background-color #fff
  overflow hidden
  position fixed
  top 20px
  left 20px
  z-index 101
  // 处理层级
  transform translateZ(1px)
  .el-icon-s-unfold
    font-size 20px
    color #409EFF
</style>